<template>
  <div class="app-container">
    <!-- 订单列表 -->
    <div>
      <el-tabs v-model="currentTab" @tab-click="handleClick">
        <!--<el-tab-pane label="分销商详情" name="first">
          <div class="list-container">
          </div>
        </el-tab-pane>-->
        <el-tab-pane label="佣金明细" name="second">
          <div class="list-container">
            <commission-details :updateFlag="commissionFlag" />
          </div>
        </el-tab-pane>
        <el-tab-pane label="下级分销商" name="third">
          <div class="list-container">
            <next-distributor :updateFlag="nextFlag" />
          </div>
        </el-tab-pane>
      </el-tabs>
    </div>
  </div>
</template>

<script>
  import commission_details from "@/views/distributionManage/components/commission_details";
  import next_distributor from "@/views/distributionManage/components/next_distributor";
  export default {
    components: {
      'commission-details': commission_details,
      'next-distributor': next_distributor
    },
    data() {
      return {
        allFlag: false,
        commissionFlag: false,
        nextFlag: false,
        detailShow: undefined,
        currentTab: 'second'
      }
    },
    watch: {

    },
    created() {

    },

    activated() {

    },

    mounted() {
      this.currentTab = this.$route.query.tab
      this.handleClick()
    },

    methods: {

      handleClick(e) {
        if(this.currentTab==='first'){
          this.allFlag = !this.allFlag
        } else if(this.currentTab=='second'){
          this.commissionFlag = !this.commissionFlag
        } else if(this.currentTab==='third'){
          this.nextFlag = !this.nextFlag
        }
      },

    }
  }
</script>
<style scoped="scoped">
  /deep/.el-card__header {
    background-color: #409EFF;
    color: whitesmoke;
  }

  /deep/.el-dialog {
    width: 40%;
    margin-top: 5vh !important;
    margin-bottom: 10vh;
  }

  .msgDiv {
    width: 80%;
    margin: auto;
    text-align: center;
  }

  /* model */
  .businessDialog /deep/.el-dialog__title {
    font-size: 26px;
    text-align: center;
    font-weight: bold;
  }

  .businessDialog /deep/.el-dialog__body {
    padding: 30px 50px;
    background-color: #dddddd57;
  }

  .businessDialog /deep/.el-dialog {
    margin-top: 10vh !important;
    width: 33%;
  }

  .businessCss .msgDiv {
    width: 80%;
    margin: auto;
    text-align: center;
  }

  .businessCss /deep/.el-form-item__label {
    font-size: 20px !important;
    text-align: right !important;
  }

  .businessCss /deep/.el-form-item__content {
    font-size: 20px !important;
  }

  /* 任务详细CSS */
  .taskWarp /deep/.el-form-item {
    margin-left: 15px;
  }

  .taskWarpTitle /deep/.el-dialog__title {
    font-size: 22px;
  }

  .taskWarp /deep/.el-form-item__label {
    font-size: 18px;
  }

  .taskCss {
    margin-left: 30px;
    margin-right: 30px;
    font-size: 16px;
    background-color: #dddddd57;
    text-align: left;
    padding: 10px 30px 10px 30px;
    margin-bottom: 10px;
    border-radius: 10px;
  }

  .taskCss span.title {
    font-weight: bold;
  }

  .taskCss span.name {
    color: #e21515eb;
  }

  .taskName {
    font-size: 22px;
    color: #e21515eb;
    background-color: #dddddd57;
    display: inline-block;
    padding: 5px 12px 5px 12px;
    font-weight: bold;
    font-family: serif;
    border-radius: 5px;
  }

  .indentLeft {
    margin-left: 26px;
  }

  .requiredCSS {
    margin-left: 30px;
    margin-right: 30px;
    background-color: #dddddd57;
    border-radius: 10px;
    padding: 10px 30px 10px 30px;
  }

  /deep/.edui-editor-imagescale {
    top: 130px !important;
  }

  /* 图片上传css */
  .avatar-uploader /deep/.el-upload {
    border: 1px dashed #807979;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
  }

  .avatar-uploader .el-upload:hover {
    border-color: #409EFF;
  }

  .avatar-uploader-icon {
    font-size: 28px;
    color: #8c939d;
    width: 100px;
    height: 100px;
    line-height: 100px;
    text-align: center;
  }

  .avatar {
    width: 100px;
    height: 100px;
    display: block;
  }

  /* model */
  .businessDialog /deep/.el-dialog__title {
    font-size: 26px;
    text-align: center;
    font-weight: bold;
  }

  .businessDialog /deep/.el-dialog__body {
    padding: 30px 50px;
    background-color: #dddddd57;
  }

  .businessDialog /deep/.el-dialog {
    margin-top: 10vh !important;
    width: 33%;
  }

  .businessCss .msgDiv {
    width: 80%;
    margin: auto;
    text-align: center;
  }

  /deep/.el-form-item__label {
    padding: 0px 12px 0px 20px;
  }

  .businessCss /deep/.el-form-item__label {
    font-size: 20px !important;
    text-align: right !important;
  }

  .businessCss /deep/.el-form-item__content {
    font-size: 20px !important;
  }

  /* 选择框*/
  .checkboxLeft {
    text-align: left;
    margin-bottom: 15px;
  }

  /deep/.el-checkbox__inner {
    /* width: 18px;
    height: 18px; */
  }

  /deep/.el-checkbox__label {
    font-size: 16px;
  }

  .checkSpan {
    width: 80px;
    line-height: 40px;
    font-size: 16px;
    text-align: right;
    margin-right: 10px;
  }

  /deep/ .el-tabs__header {
    /*position: fixed;
    z-index: 9999;
    background-color: #ffffff;
    width: 100vw;
    top: 50px;*/
  }

  .list-container{
    height: calc(100vh - 150px);
    overflow: auto;
  }

</style>
